﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Fee.Mapping
{
    public class FrameworkContractMapping : IEntityTypeConfiguration<FrameworkContract>
    {
        public void Configure(EntityTypeBuilder<FrameworkContract> builder)
        {
            builder.HasKey(_ => _.Id);
            builder.Property(_ => _.Amount);

            builder.HasMany(_ => _.ReductionItems).WithOne();
            builder.HasOne(_ => _.Cooperation);


        }
    }
}